<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>主页侧滑菜单</title>
		<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" type="text/css" href="css/common.css"/>	
		<link rel="stylesheet" href="css/mui.min.css">
		<style type="text/css">
			body,.mui-content {
				color: #000;
				background-color: rgba(242, 243, 245, 0);
			
				/*background: url(images/index-menu-bg.png) no-repeat fixed top;*/
			}
			.logo-img {
				width: 40px;
				height: 40px;
			}
			.logo{
				font-size: 20px;
				padding-top: 8px;
			}
		</style>
	</head>
	<body>
		<div class="mui-content">
			<div class="hr-30"></div>
			<div class="content">
				<ul class="mui-table-view">
					<li class="mui-table-view-cell">
						<img class="mui-media-object mui-pull-left logo-img" src="images/user-photo.png">
						<div class="mui-media-body">
							<p class='mui-ellipsis logo'>三河热力集团</p> 
						</div>
					</li>
				</ul>
				<!--<div style="text-indent: 20px;margin: 35px 15px 10px;">三河热力集团</div>	-->
				<!--<p><button id="login-btn" type="button" class="mui-btn mui-btn-danger mui-btn-block">登录</button></p>-->
			</div>
			
			<ul class="mui-table-view mui-table-view-chevron">
				<li class="mui-table-view-cell mui-hidden">
					<a class="mui-navigate-right" id="feedback" href="feedback.html">
						<div>
							<span class="mui-icon mui-icon-email"></span><span>意见反馈</span>
						</div>
					</a>
				</li>
				<li class="mui-table-view-cell">
					<a class="mui-navigate-right" id="tel" open-type="tel">
						<div>
							<span class="mui-icon mui-icon-phone"></span><span>客服电话</span>
						</div>
					</a>
				</li>
				<li class="mui-table-view-cell">
					<a class="mui-navigate-right" id="guide" href="guide.html">
						<div>
							<span class="mui-icon mui-icon-home"></span><span>欢迎页</span>
						</div>
					</a>
				</li>
				<li class="mui-table-view-cell">
					<a class="mui-navigate-right" id="update" open-type="update">
						<div>
							<span class="mui-icon mui-icon-refreshempty"></span><span>版本更新</span>
						</div>
					</a>
				</li>
				<li class="mui-table-view-cell">
					<a class="mui-navigate-right" id="about" href="about.html">
						<div>
							<span class="mui-icon mui-icon-info"></span><span>技术支持</span>
						</div>
					</a>
				</li>
			</ul>
		</div>
		<script src="js/mui.min.js"></script>
		<script type="text/javascript" src="js/md5.js" ></script>
		<script type="text/javascript" src="js/uuid.js" ></script>
		<script type="text/javascript" src="js/utils.js" ></script>
		<script>
			// 侧滑菜单
			var aniShow = "slide-in-right";
			
			//关于backbutton和menubutton两个按键的说明，在iOS平台不存在，故需隐藏
			if(!mui.os.android){
				var span = document.getElementById("android-only")
				if(span){
					span.style.display = "none";
				}
				aniShow = "pop-in";
			}
			mui.plusReady(function () {
				
				//客服电话
				document.getElementById("tel").addEventListener('tap', function() {
					var indexPage = plus.webview.getWebviewById('index') ;
					mui.fire(indexPage,"menu:close") ;
					plus.device.dial(SERVICE_TEL, true);
				});
				 //检查更新
				document.getElementById("update").addEventListener('tap', function() {
					var indexPage = plus.webview.getWebviewById('index') ;
					mui.fire(indexPage,"menu:close") ;
					xhz.update(true) ;
				});
				
				window.addEventListener('dragstart',function(e){
					mui.gestures.touch.lockDirection = true; //锁定方向
					mui.gestures.touch.startDirection = e.detail.direction;
				});
				window.addEventListener('dragleft', function(e) {
					if(!mui.isScrolling){
						e.detail.gesture.preventDefault();	
					}
				});
				//监听左滑事件，若菜单已展开，左滑要关闭菜单；
				window.addEventListener("swipeleft",function (e) {
					if(Math.abs(e.detail.angle)>170){
						close();						
					}
				});
				mui('.mui-table-view').on('tap', 'a', function() {
				var id = this.getAttribute("href");
				var type = this.getAttribute("open-type");
				var href = this.href;
				var webview_style = {
					popGesture: "close"
				};
				var indexPage = plus.webview.getWebviewById('index') ;
				mui.fire(indexPage,"menu:close") ;
				mui.openWindow({
					id: id,
					url: href,
					styles: webview_style,
					show: {
						aniShow: aniShow
					},
					waiting: {
						autoShow: false
					}
				});
			});
			})
			
		</script>
	</body>
</html>